package com.gitee.feizns.explore.data_structure.tree.bs.easy;

/**
 * @author feizns
 * @since 2019/12/24
 */
public class IsSameTree {

    public static void main(String[] args) {

    }

    public static boolean isSameTree(TreeNode p, TreeNode q) {
        if ( p != null && q != null )
            return p.val == q.val && (isSameTree(p.left, q.left)) && (isSameTree(p.right, q.right));
        return false;
    }

}
